package com.holy.sh.module_base_mvp.utils;

import android.util.Log;

/**
 * Created by yili on 2015/12/15.
 * Email : yili270@163.com
 * Description : Log输出的工具类
 */
public class LogUtils {
    public static boolean isShowLog = true;

    /**
     * d方式显示log
     *
     * @param classString  类名TAG
     * @param methodString 方法名
     * @param message      log信息
     */
    public static void d(String classString, String methodString, String message) {
        if (isShowLog) {
            if (classString == null || classString.length() == 0) classString = "TAG";
            Log.d(classString, methodString + "() returned: " + message);
        }
    }

    /**
     * e方式显示log
     *
     * @param classString  类名TAG
     * @param methodString 方法名
     * @param message      log信息
     */
    public static void e(String classString, String methodString, String message) {
        if (isShowLog) {
            if (classString == null || classString.length() == 0) classString = "TAG";
            Log.e(classString, methodString + "() returned: " + message);
        }
    }

    /**
     * i方式显示log
     *
     * @param classString  类名TAG
     * @param methodString 方法名
     * @param message      log信息
     */
    public static void i(String classString, String methodString, String message) {
        if (isShowLog) {
            if (classString == null || classString.length() == 0) classString = "TAG";
            Log.i(classString, methodString + " returned: " + message);
        }
    }
}
